﻿using System;

namespace Alex.Framework.Domain.Repositories
{
    /// <summary>
    /// 仓储上下文基类
    /// </summary>
    public abstract class RepositoryContextBase : DisposableObject, IRepositoryContext
    {
        /// <summary>
        /// 获取指定聚合根类型的仓储
        /// </summary>
        /// <typeparam name="T">聚合根类型</typeparam>
        /// <returns>聚合根的仓储对象</returns>
        public abstract IRepository<T> GetRepository<T>() where T : IAggregateRoot;
    }
}
